package serverDB_classes;

import java.util.HashSet;
import java.util.Set;
/**
 * Dir instance - holds the dirs from data base 
 * 						matching the data base mapping
 * @author Yoav
 *
 */
public class Dir {
	
	private int dirID;
	//dir's path
	private String dirPath;
	//files in dir
	private Set<UserFiles> files = new HashSet<UserFiles>();
	//users that share the dir 
	private Set<UserData> users = new HashSet<UserData>();
	
	/**
	 * constructor
	 * @param files - files in dir
	 * @param users - users that share the dir
	 * @param dirPath - dir's path
	 */
	public Dir(Set<UserFiles> files,Set<UserData> users,String dirPath) {
		this.files=files;
		this.users=users;
		this.dirPath=dirPath;
	}
	/**
	 * d.cont
	 */
	public Dir() {		
	}
	/**
	 * 
	 * @return dir id
	 */
	public int getDirID() {
		return dirID;
	}
	/**
	 * 
	 * @return dir's path
	 */
	public String getDirPath() {
		return dirPath;
	}	

	/**
	 * 
	 * @return files in dir
	 */
	public Set<UserFiles> getFiles() {
		return files;
	}
	/**
	 * 
	 * @return users that share the dir
	 */
	public Set<UserData> getUsers() {
		return users;
	}
	/**
	 * set users that share the dir
	 * @param users users that share the dir
	 */
	public void setUsers(Set<UserData> users) {
		this.users = users;
	}
	/**
	 * set files in dir
	 * @param files - files in dir
	 */
	public void setFiles(Set<UserFiles> files) {
		this.files = files;
	}
	/**
	 * set dir id
	 * @param dirID - dir id
	 */
	public void setDirID(int dirID) {
		this.dirID = dirID;
	}
	/**
	 * set dir's path
	 * @param dirPath dir's path
	 */
	public void setDirPath(String dirPath) {
		this.dirPath = dirPath;
	}
}
